#!/usr/bin/python
# -*- coding: utf-8 -*-

'''
Introduction to Programming in Java - An Interdisciplinary Approach

All code snippets and examples ported to Python by
Scott C. King (revisionx at {gee}ma1l <dot> c0m).


sys is a required import here in order to use command line arguments.
https://docs.python.org/2/tutorial/stdlib.html


Exercise 1.1.5
Modify useargument.py to make a program usethree.py that takes
three names and prints out a proper sentence with the names in the
reverse of the order given, so that, for example,
python usethree.py Alice Bob Carol gives Hi Carol, Bob, and Alice.

Syntax:
python usethree.py Alice Bob Carol

'''

import sys

print 'Hi ' + sys.argv[3] + ', ' + sys.argv[2] + ', and ' + sys.argv[1] + '.'

# Alternate
print 'Hi {}, {}, and {}.'.format(sys.argv[3], sys.argv[2], sys.argv[1])
